/*
 * Copyright © 2016 Cask Data, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

@dark-grey: #999999;
@light-grey: #cccccc;

my-sql-selector {
  .sql-select-fields-container {
    position: relative;
    padding-top: 10px;

    .button-container {
      position: absolute;
      right: 0;
      top: 0;

      .btn {
        padding: 2px 7px;
        font-weight: 500;
        font-size: 12px;
      }

      .btn-default {
        color: @dark-grey;
        border: 2px solid @light-grey;
      }

      .btn-reset {
        background-color: @light-grey;
        color: white;
      }
    }

    .error-message { margin-bottom: 10px; }
    .empty-message { margin-bottom: 0; }

    .stage-container {
      h4 {
        cursor: pointer;
        span { color: #666666; }

        &.expanded {
          span {
            color: #333333;
            &.badge-danger { color: white; }
          }
          margin-bottom: 5px;
        }
      }

      .badge-danger {
        background-color: #ff6666;
        color: white;
        font-size: 9px;
        margin-bottom: 3px;
      }

      .table-container {
        background-color: #eeeeee;
        padding: 10px;
        margin-bottom: 5px;

        .table {
          .checkbox-column {
            width: 100px;
          }

          thead {
            th,
            th:hover,
            th:focus {
              cursor: default;
            }

            tr > th {
              font-size: 13px;
              padding-left: 5px;

              &.checkbox-column { padding-bottom: 5px; }

              &:first-child,
              &:last-child {
                padding-bottom: 10px;
              }
            }

            .btn-default {
              border: 0;
              padding: 5px 7px;
              span { margin-left: 7px; }
            }
          }

          tbody {
            tr {
              border: 0;
              border-top: 1px solid #dedede;

              td { border: 0; }

              &.error {
                background-color: #fde2e2;
                border: 1px solid #ff6666;
              }

              .checkbox-column { padding-left: 15px; }
            }
          }
        }
      }
    }
  }
}

.sql-select-dropwdown {
  z-index: 1050;
  margin-top: 0;
  border: 0;
}
